package com.fqgj.report.statistics.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.fqgj.report.statistics.dao.BiFailMsgDetailDao;
import com.fqgj.report.statistics.entity.BiFailMsgDetailEntity;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* User: zzzz76
* Date: 2017-12-14
* Time: 13:23:44.160
*/

@Repository
public class BiFailMsgDetailDaoImpl extends AbstractBaseMapper<BiFailMsgDetailEntity> implements BiFailMsgDetailDao {
    @Autowired
    @Qualifier("sqlSessionFactory2")
    private SqlSessionFactory sqlSessionFactory;

    @Override
    public List<BiFailMsgDetailEntity> selectTripleCallFailMsgStatistics(String date, Integer productType, Integer tripleType) {
        Map<String, Object> param = new HashMap<>();
        param.put("date", date);
        param.put("productType", productType);
        param.put("tripleType", tripleType);
        SqlSession sqlSession = new SqlSessionTemplate(sqlSessionFactory);
        return sqlSession.selectList(getStatement(".selectTripleCallFailMsgStatistics"), param);
    }
}